#include <Arduino.h>
#include <core_debug.h>
#include "flashFs.h"
extern const char *hwModel;
extern const int build;
extern int uptime;
extern int atemp_init, atemp, avref;
#define X1 PD4
#define X2 PD7
#define X3 PB6

#define XA4 A3
#define XA7 A4

#define LED_RUN PB0
#define LED_ERR PA0
#define LED_ETH PC3


#define XX_MAX 16
#define YY_MAX 24
#define XA_MAX 10
#define XT_MAX 4
#define YA_MAX 2

typedef struct
{
    char xx1, xx2, xx3,  yy1, yy2, yy3, yy4, yy5, yy6;
    unsigned short xa1, xa2, xa3, ya1, ya2;
} IOVAR;
extern IOVAR io;
extern uint16_t year, wdg_time;
extern uint8_t  wdg_en, reboot;
class hwboard
{
public:
    hwboard();
    void baseinit();
    void begin();
    void io_init();
    void input();
    void output();
    void ioled();
    void flashClear();
};
extern hwboard board;
void setReboot();
extern int test_index;
extern FlashFs flash_fs;
extern "C"
{
    void plc_run_start();

    void plc_run_end();
    void net_led_on();
    void net_led_off();
}